const BASE_URL = "http://localhost:56586/api/v1";
// const BASE_URL = "http://qkl.czu.edu.cn/api/v1";

export default {

  INDEX_SEARCH_URL: BASE_URL + "/index/search",
  INDEX_DATA_URL: BASE_URL + "/index/statdata",
  BLOCK_INFOS_URL: BASE_URL + "/block/blocks/",
  BLOCK_NUMBER_URL: BASE_URL + "/block/number/",
  BLOCK_HASH_URL: BASE_URL + "/block/hash/",

  TX_TRANSACTIONS_URL: BASE_URL + "/tx/transactions/",
  TX_HASH_URL: BASE_URL + "/tx/transaction/",
  TX_RECEIPT_URL: BASE_URL + "/tx/receipt/",

  CONTRACT_INFOS_URL: BASE_URL + "/contract/contracts/",
  CONTRACT_DEPLOY_URL: BASE_URL + "/contract/deploy",
  CONTRACT_RECEPIT_URL: BASE_URL + "/contract/hash/",
  CONTRACT_JAVA_CODE_URL: BASE_URL + "/contract/javacode",

  ACCOUNT_BALANCE_URL: BASE_URL + "/account/balance/",
  ACCOUNT_WALLET_URL: BASE_URL + "/account/wallet",
  LOGIN_CAPTCHA_URL: BASE_URL + "/login/kaptcha.jpg",
  ACCOUNT_LOGIN_URL: BASE_URL + "/login/login",
  LOGIN_CHECK_URL: BASE_URL + "/login/checklogin",
  ACCOUNT_USERINFOS_URL: BASE_URL + "/userinfo/userinfos/",
  ACCOUNT_USERINFO_URL: BASE_URL + "/userinfo/userinfo",
  USER_BALANCE_URL: BASE_URL + "/userinfo/balance/",
  ACCOUNT_TRANSFER_URL: BASE_URL + "/account/transfer",


  copyToClipboard: (data, callback) => {
    if (window.clipboardData) {
      window.clipboardData.setData("text", data);
      //this.$message.success(data + " Copied!")
      callback();
    } else {
      (function(content) {
        document.oncopy = function(e) {
          e.clipboardData.setData("text", content);
          e.preventDefault();
          document.oncopy = null;
        };
      })(data);
      document.execCommand("Copy");
      callback();
      // this.$message.success(data + " Copied!")
    }
  }

}
